Skip to content

Fix CG alert 18198937: patch self-contained .NET runtime via SDK 10.0.403 - #84

Closed
Skylar (skylarnam) wants to merge 1 commit into
mainfrom
cg-fix/18198937
Closed

Skylar (skylarnam) wants to merge 1 commit into
mainfrom
cg-fix/18198937

Conversation

@skylarnam

Copy link
Copy Markdown
Contributor

What?

Update global.json from .NET SDK 10.0.401 to 10.0.403 to address CG alert 18198937, DOTNET-Security-SC-10.0.

Why?

CG identifies net10.0 application-selfcontained in VSConfigFinder\VSConfigFinder.csproj: the self-contained deployment bundles a vulnerable runtime. The alert recommends SDK 10.0.403.

How?

Raise the SDK minimum to the exact recommended patched version in the same feature band. The affected project has SelfContained=true and no RuntimeFrameworkVersion override. The updated SDK selects the runtime used by the self-contained publication. Preserve rollForward: feature and all project, feed and pipeline settings.

Official runtime selection guidance: https://learn.microsoft.com/en-us/dotnet/core/deploying/runtime-patch-selection

Testing?

  • Added unit tests
  • Validated SDK selection, existing tests and self-contained publication:
    • dotnet --version — passed; selected 10.0.403.
    • dotnet restore VSConfigFinder.sln --configfile nuget.config --verbosity minimal -p:NuGetInteractive=false — passed using the existing configured feed.
    • dotnet test VSConfigFinder.Test --configuration Release --no-restore --verbosity minimal — passed; 6 tests, 0 failures, 0 skipped.
    • dotnet publish VSConfigFinder --configuration Release --no-restore --verbosity minimal — passed for the local Windows ARM64 environment.
    • dotnet msbuild VSConfigFinder -nologo -target:ProcessFrameworkReferences -getProperty:NETCoreSdkVersion,SelfContained,RuntimeIdentifier -getItem:RuntimeFramework,RuntimePack — passed; verified SDK 10.0.403, SelfContained=true, and Microsoft.NETCore.App.Runtime.win-arm64 version 10.0.14.
    • Generated runtime configuration — confirmed Microsoft.NETCore.App version 10.0.14.
    • git diff --check and scope check — passed; only the expected SDK version changed.

No new unit tests were added because the fix changes the SDK pin only. Signed production packaging, other runtime architectures, and a fresh CG scan were not run locally.

Screenshots (optional)

Not applicable; no UI changes.

Additional information (optional)

CG alert: https://dev.azure.com/devdiv/0bdbc590-a062-4c3f-b0f6-9383f67865ee/_componentGovernance/209439?alertId=18198937&branchMoniker=main

This branch was created directly from main, independently of #83. The code change is identical to #83: the same SDK patch addresses the SDK and self-contained runtime findings. Merge only one of these equivalent fixes; the other PR becomes redundant.

Rebuild and republish the self-contained application after merging, then allow CG to rescan before considering the alert resolved.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant